<!DOCTYPE html>
<html>
  <head>
    <style type="text/css">
      * {
        padding: 0;
        margin: 0;
      }
    </style>
    <title>111</title>
    <script src="./javascripts/jquery.min.js" type="text/javascript"></script>
    <script>
      function pressEnter(ele, eve){
        if (eve.keyCode === 13) {
          $.post(`${window.location.origin}/login`, { loginName: ele.value }, function(data, status){
            // 7、登录成功后刷新页面，重新触发第一步
            if (status == 'success') {
              location.reload();
            }
          })
        }
      };
    </script>
  </head>
  <body style="width: 100vw; height: 100vh;">
    <input style="margin: 26.80% 43%; font-size: 20px;border: 1px solid;" id="loginName" type="text" onkeypress="pressEnter(this, event)">
  </body>
</html>